<?php
/**
 * 私人定制
 * User: tengyu
 * Date: 2017/10/13
 */?>
@extends('common.common')
@section('title','定制化产品')
@section('css')
    <link rel="stylesheet" href="{{url('/css/customization_P.css')}}">
@endsection
@section('js')
    <script>
        function customized_submit()
        {
            var customized_size = $("input[name='customized_size']").val();
            if(!customized_size){
                alert('请填写产品尺寸!');return false;
            }
            var customized_color = $("input[name='customized_color']").val();
            if(!customized_color){
                alert('请填写需求产品颜色!');return false;
            }
            var customized_num = $("input[name='customized_num']").val();
            if(!customized_num){
                alert('请填写产品数量!');return false;
            }
            var customized_use = $("input[name='customized_use']").val();
            if(!customized_use){
                alert('请填写产品用途!');return false;
            }
            var customized_require = $("#customized_require").val();
            if(!customized_require){
                alert('请写出你的简要需求!');return false;
            }
            return true;
        }
    </script>
@endsection
@section('content')
    <div id="content">
        <!--内容导航栏-->
        <div class="row">
            @include('common.centernav')
            <div class="container">
                @if (count($errors) > 0)
                    <div class="alert alert-danger text-left">
                        <strong>定制化产品需求信息录入反馈!</strong>
                        <ul>
                            @if(is_object($errors))
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            @else
                                <li>{{$errors}}</li>
                            @endif
                        </ul>
                    </div>
                @endif
                <div class="Ft">
                    <p>定制化产品</p>
                </div>
                <div class="Lb">
                    <!--轮播-->
                    <div id="carousel">
                        <div id="carousel_pic" class="carousel slide" data-ride="carousel" data-interval="3000">
                            <div class="carousel-inner">
                                <div class="item active">
                                    <img style="width: 100%;" src="img/customization1.png">
                                </div>
                                <div class="item">
                                    <img src="img/customization1.png">
                                </div>
                                <div class="item">
                                    <img src="img/customization1.png">
                                </div>
                            </div>
                        </div>
                    </div>
                    <form class="form-control myform form-horizontal" action="{{url('/customized_data')}}" method="post" onsubmit="return customized_submit()">
                        {!! csrf_field() !!}
                        <div class="control-group">
                            <p class="text-center cff head_title">私人订制</p>
                            <p class="text-center cff">一站式服务 , 为您的私人订制</p>
                            <p class="text-center cff o">保驾护航</p>
                            <div class="formtable clearfix">
                                <div class="col-lg-6 col-md-6 col-xs-6">
                                    <div class="input-group w100">
                                        <input type="text" class="" name="customized_size" value="" placeholder="产品尺寸" maxlength="30">
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-xs-6">
                                    <div class="input-group w100">
                                        <input type="text" class="" name="customized_color" placeholder="产品颜色" maxlength="5">
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-xs-6">
                                    <div class="input-group w100">
                                        <input type="text" class="" name="customized_num" placeholder="需求数量" maxlength="10">
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-xs-6">
                                    <div class="input-group w100">
                                        <input type="text" class="" name="customized_use" value="" placeholder="产品功能" maxlength="30">
                                    </div>
                                </div>
                                <div class="col-lg-12 col-md-12 col-xs-12">
                                    <textarea class="writeTool" id="customized_require" name="customized_require" rows="" cols="" placeholder="请告诉我们，您的具体需求"></textarea>
                                </div>
                                <div class="col-lg-12 col-md-12 col-xs-12">
                                    <input type="submit" class="submit  btn btn-primary" value="提交我们的订制需求"/>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    </div>
@endsection